find the triplet that sum to a given value